package com.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

/***
 * @Author maochuang.li
 *
 * @Email maochuang.li@fuyinhy.com
 *
 * @Date Create in 16:32 2018/1/4 0004
 */
public class OtherUtils {
    /**
     * 时间格式化
     *
     * @param date
     * @Author maochuang.li
     * @Date Create in 16:33 2018/1/4 0004
     */
    public static String getDate(Date date) {
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        String format1 = format.format(date);
        return format1;
    }

    /**
     * 取当前时间
     *
     * @return
     */
    public static String getNowDate() {
        return getDate(new Date());
    }
}
